1. Field of the Invention
The present invention relates to a moving picture encoding technology using a motion compensation prediction, and in particular, relates to a picture encoding device, a picture encoding method, a picture encoding program, a picture decoding device, a picture decoding method, and a picture decoding program that encode or decode motion information used for a motion compensation prediction.
The motion compensation prediction is used in general moving picture compression encoding. The motion compensation prediction is a technology that partitions a target picture into fine blocks and uses a decoded picture as a reference picture to generate a signal in a position moved from a target block of the target picture to a reference block of the reference picture as a prediction signal based on the amount of motion represented by a motion vector. The motion compensation prediction uses one motion vector to make a unidirectional prediction or uses two motion vectors to make a bidirectional prediction.
Regarding the motion vector, the compression efficiency is improved by selecting the motion vector of a neighboring encoded block of the processing target block as a motion vector predictor (also simply called a vector predictor), determining a difference between the motion vector of the processing target block and the vector predictor, and transmitting the vector difference as a coding vector.
In MPEG-4AVC, the efficiency of the motion compensation prediction is improved by making the block size of the motion compensation prediction finer and more diverse than in MPEG-2. On the other hand, the number of motion vectors increases with a finer block size, posing a problem of the code amount of coding vectors.
Thus, while the motion vector of the left neighboring block is simply selected as the vector predictor in MPEG-2, the precision of the vector predictor is improved and an increase of the code amount of coding vectors is inhibited in MPEG-4AVC by selecting a median of motion vectors of a plurality of neighboring blocks as the vector predictor. Further in MPEG-4AVC, a direct motion compensation prediction is known. The direct motion compensation prediction realizes a motion compensation prediction by generating a new motion vector by scaling the motion vector of the block located in the same position as the processing target block of another encoded picture based on distances between the target picture and two reference pictures without transmitting any coding vector.
Also, a motion compensation prediction that realizes a motion compensation prediction by using motion information of neighboring blocks of the processing target block without transmitting any coding vector is known (see, for example, Japanese Patent Application Laid-Open Publication No. 10-276439).